// raw data statistics - mainly for checking daq and basics of DETs
inline void a(vector<TH1 *> &v, TObject *h){ v.push_back((TH1 *)h); }
void raw(){
  TFile *f = new TFile(getenv("TMP1"));
  TTree *etf = (TTree *)f->Get("etf");
  TCanvas *c = new TCanvas("c", "Raw Data Statistics", 1680, 1050);
  c->Divide(3, 2);
  c->cd(1); if(etf->GetBranch("pxi0")) etf->Draw("pxi0.GetSectionLength()>>h1(500, 0., 1500.)");
  c->cd(2); if(etf->GetBranch("vme0")) etf->Draw("vme0.GetEventLength()>>h2(500, 0., 400.)");
  c->cd(3); if(etf->GetBranch("pxi1")) etf->Draw("pxi1.GetSectionLength()>>h3(500, 0., 1500.)");
  c->cd(4); if(etf->GetBranch("tchpxi0")) etf->Draw("tchpxi0.chid()>>h4(4001, -0.5, 4000.5.)");
  c->cd(5); if(etf->GetBranch("tchpxi1")) etf->Draw("tchpxi1.chid()>>h5(401, 3949.5, 4350.5.)");
  c->cd(6); if(etf->GetBranch("vme0")) etf->Draw("tchvme0.chid()>>h6(501, 3499.5, 4000.5.)");

  // c->Print("raw.pdf");
} // end raw
